/**
 * Project Name:cnsy-url-short-service
 * File Name:SysRoleGroupInfoController.java
 * Package Name:cn.cnsy123.shorturls.api.controller.business 
 * Date: 2020年4月28日-上午11:44:05
 * Copyright (c) 2020, yangpengfei@360@126.com All Rights Reserved. 
 *
 */

package cn.cnsy123.shorturls.api.controller.business;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.cnsy123.shorturls.api.controller.param.RoleInfoQueryParam;
import cn.cnsy123.shorturls.api.controller.result.BootStrapTableQueryResult;
import cn.cnsy123.shorturls.api.controller.result.RoleInfoQueryResult;

/**
 * ClassName: SysRoleGroupInfoController
 * 
 * @author yangpengfei
 * @date 2020年4月28日-上午11:44:05
 * @version 1.0
 * @since JDK 1.7
 */
@Controller
@RequestMapping("/role")
public class SysRoleGroupInfoController {
    
    @RequestMapping(value = "/tableList",produces = {MediaType.APPLICATION_JSON_UTF8_VALUE})
    @ResponseBody
    public BootStrapTableQueryResult<RoleInfoQueryResult> queryRoleItem(@RequestBody RoleInfoQueryParam roleInfoQueryParam) {
        BootStrapTableQueryResult<RoleInfoQueryResult> bootStrapTableQueryResult = new BootStrapTableQueryResult<RoleInfoQueryResult>();
        bootStrapTableQueryResult.setTotal(100L);
        bootStrapTableQueryResult.setTotalNotFiltered(100L);
        List<RoleInfoQueryResult> rows = new ArrayList<RoleInfoQueryResult>();
        rows.add(new RoleInfoQueryResult(1L, "系统管理员", "权限最大的角色", new Date(System.currentTimeMillis())));
        rows.add(new RoleInfoQueryResult(1L, "业务管理员", "掌管所有的业务模块权限分配", new Date(System.currentTimeMillis())));
        rows.add(new RoleInfoQueryResult(1L, "普通人员", "由业务管理员分配出来的普通人员", new Date(System.currentTimeMillis())));
        bootStrapTableQueryResult.setRows(rows);
        return bootStrapTableQueryResult;
    }

}
